var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (n, o) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, n) {
              t.__proto__ = n;
            }) ||
          function (t, n) {
            for (var o in n)
              Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
          })(n, o);
      };
      return function (n, o) {
        function e() {
          this.constructor = n;
        }
        if ("function" != typeof o && null !== o)
          throw new TypeError(
            "Class extends value " + String(o) + " is not a constructor or null"
          );
        t(n, o),
          (n.prototype =
            null === o
              ? Object.create(o)
              : ((e.prototype = o.prototype), new e()));
      };
    })(),
  AXBlackSmithView = (function (t) {
    function n() {
      var n = t.call(this) || this;
      return (
        n.btn_blackSmith_back.on(Laya.Event.CLICK, n, n.onBlackSmithBackFn),
        n.btn_blackSmith_hechengbaoshi.on(
          Laya.Event.CLICK,
          n,
          n.onDidClickHeChengBaoShi
        ),
        n.btn_blackSmith_baoShiHuiShou.on(
          Laya.Event.CLICK,
          n,
          n.onDidClickBaoShiAction
        ),
        n.btn_blackSmith_ZhuangBeiHuiShou.on(
          Laya.Event.CLICK,
          n,
          n.onDidClickSmithAction
        ),
        n.btn_stone_hecheng.on(Laya.Event.CLICK, n, n.onDidClickStoneAction),
        n.btn_stone_huishou.on(Laya.Event.CLICK, n, n.onDidClickStoneAction),
        n.btn_zhuangbeidazao.on(Laya.Event.CLICK, n, n.onEquimentForgeAction),
        n
      );
    }
    return (
      __extends(n, t),
      (n.showBlackSmith = function () {
        return (
          null == this.blackSmithVC && (this.blackSmithVC = new n()),
          this.blackSmithVC
        );
      }),
      (n.prototype.onDidClickHeChengBaoShi = function () {
        var t = AXGemFusionView.showGemFunsionView();
        t.pos(0, 35), Laya.stage.addChild(t);
      }),
      (n.prototype.onDidClickBaoShiAction = function (t) {
        if ("item_baoshihuishou" == t.target.name) {
          var n = AXGemCollectionView.showCollectionView();
          n.pos(0, 35), Laya.stage.addChild(n);
        }
      }),
      (n.prototype.onDidClickSmithAction = function (t) {
        if ("item_zhuangbeihuishou" == t.target.name) {
          var n = RecEquipmentView.showRecEquView();
          n.pos(0, 35), Laya.stage.addChild(n);
        }
      }),
      (n.prototype.onDidClickStoneAction = function (t) {
        if ("item_stone_huishou" == t.target.name) {
          n = MineralStoneMainView.openMineralStoneView("矿石回收");
          Laya.stage.addChild(n);
        } else if ("item_stone_hecheng" == t.target.name) {
          var n = MineralStoneMainView.openMineralStoneView("矿石合成");
          Laya.stage.addChild(n);
        }
      }),
      (n.prototype.onEquimentForgeAction = function () {
        var t = ForgeEquipmentView.openForgeEquipmentView("1");
        t.pos(0, 35), Laya.stage.addChild(t);
      }),
      (n.prototype.onBlackSmithBackFn = function () {
        this.removeSelf();
      }),
      n
    );
  })(ui.MarketController.AXBlackSmithViewUI);
